package org.abc.fund.repository.funds;

import org.abc.fund.entity.funds.FundHolding;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface FundHoldingRepository extends JpaRepository<FundHolding, Long> {

    // 根据基金代码查询全部持仓（最新/某报告期可选扩展）
    List<FundHolding> findByFundCodeOrderByHoldingRatioDesc(String fundCode);

    // 按基金和报告期查询
    List<FundHolding> findByFundCodeAndReportDateOrderByHoldingRatioDesc(String fundCode, String reportDate);
}
